package com.jwthhealth_pub.wristband.steps.utils;

import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.formatter.IValueFormatter;
import com.github.mikephil.charting.utils.ViewPortHandler;

import java.text.DecimalFormat;

/**
 * Created by yang on 2018/1/2.
 */

public class MyValueFormatter implements IValueFormatter {

    private DecimalFormat mFormat;

    //"###,###,###,##0.0"
    public MyValueFormatter() {
        mFormat = new DecimalFormat("#");
    }
    @Override
    public String getFormattedValue(float value, Entry entry, int dataSetIndex, ViewPortHandler viewPortHandler) {

        return mFormat.format(value);
    }
}
